#include "MainMenuGui.h"

#include <Gwen/Controls/ImagePanel.h>
#include <Gwen/Controls/Button.h>

#include "GameGui.h"
#include "OptionsMenuGui.h"

MainMenuGui::MainMenuGui(Gwen::Controls::Base *a_pParent, PF::Window *a_pWindow)
	: Control(a_pParent, a_pWindow)
{
	SetSize(1024, 768);

	Gwen::Controls::ImagePanel *pBackgroundImagePanel = new Gwen::Controls::ImagePanel(this);
	pBackgroundImagePanel->SetImage("images/logo.jpg");
	pBackgroundImagePanel->SizeToContents();

	Gwen::Controls::Button *pStartGameButton = new Gwen::Controls::Button(this);
	pStartGameButton->SetText("Start Game");
	Gwen::Align::CenterVertically(pStartGameButton);
	pStartGameButton->MoveBy(40, 20);
	pStartGameButton->onPress.Add(this, &MainMenuGui::StartGameButtonPressed);

	Gwen::Controls::Button *pOptionsMenuButton = new Gwen::Controls::Button(this);
	pOptionsMenuButton->SetText("Options");
	Gwen::Align::CenterVertically(pOptionsMenuButton);
	pOptionsMenuButton->MoveBy(40, 60);
	pOptionsMenuButton->onPress.Add(this, &MainMenuGui::OptionsMenuButtonPressed);

	Gwen::Controls::Button *pExitButton = new Gwen::Controls::Button(this);
	pExitButton->SetText("Exit");
	Gwen::Align::CenterVertically(pExitButton);
	pExitButton->MoveBy(40, 100);
	pExitButton->onPress.Add(this, &MainMenuGui::ExitButtonPressed);
}

void MainMenuGui::StartGameButtonPressed(Gwen::Controls::Base *a_pControl)
{
	GameGui *pGameGui = new GameGui(this, m_pWindow);
}

void MainMenuGui::OptionsMenuButtonPressed(Gwen::Controls::Base *a_pControl)
{
	OptionsMenuGui *pOptionsMenuGui = new OptionsMenuGui(this, m_pWindow);
}

void MainMenuGui::ExitButtonPressed(Gwen::Controls::Base *a_pControl)
{
}
